package com.elomobile.harmony.xml;

import com.elomobile.utilitaire.parseurXmlVoyageV3.parseur.types.SchemaString;

public class UniteType extends com.elomobile.utilitaire.parseurXmlVoyageV3.parseur.xml.Node {

	private static final long serialVersionUID = -4535122142831206941L;

	public UniteType() {
		super();
	}

	public UniteType(UniteType node) {
		super(node);
	}

	public UniteType(org.w3c.dom.Node node) {
		super(node);
	}

	public UniteType(org.w3c.dom.Document doc) {
		super(doc);
	}

	public void adjustPrefix() {
		int count;
		count = getDomChildCount(Attribute, null, "CodeUnite");
		for (int i = 0; i < count; i++) {
			org.w3c.dom.Node tmpNode = getDomChildAt(Attribute, null, "CodeUnite", i);
			internalAdjustPrefix(tmpNode, false);
		}
		count = getDomChildCount(Attribute, null, "LibelleUnite");
		for (int i = 0; i < count; i++) {
			org.w3c.dom.Node tmpNode = getDomChildAt(Attribute, null, "LibelleUnite", i);
			internalAdjustPrefix(tmpNode, false);
		}
	}

	public int getCodeUniteMinCount() {
		return 1;
	}

	public int getCodeUniteMaxCount() {
		return 1;
	}

	public int getCodeUniteCount() {
		return getDomChildCount(Attribute, null, "CodeUnite");
	}

	public boolean hasCodeUnite() {
		return hasDomChild(Attribute, null, "CodeUnite");
	}

	public SchemaString getCodeUniteAt(int index) throws Exception {
		return new SchemaString(getDomNodeValue(getDomChildAt(Attribute, null, "CodeUnite", index)));
	}

	public SchemaString getCodeUnite() throws Exception {
		return getCodeUniteAt(0);
	}

	public void removeCodeUniteAt(int index) {
		removeDomChildAt(Attribute, null, "CodeUnite", index);
	}

	public void removeCodeUnite() {
		while (hasCodeUnite())
			removeCodeUniteAt(0);
	}

	public void addCodeUnite(SchemaString value) {
		appendDomChild(Attribute, null, "CodeUnite", value.toString());
	}

	public void addCodeUnite(String value) throws Exception {
		addCodeUnite(new SchemaString(value));
	}

	public void insertCodeUniteAt(SchemaString value, int index) {
		insertDomChildAt(Attribute, null, "CodeUnite", index, value.toString());
	}

	public void insertCodeUniteAt(String value, int index) throws Exception {
		insertCodeUniteAt(new SchemaString(value), index);
	}

	public void replaceCodeUniteAt(SchemaString value, int index) {
		replaceDomChildAt(Attribute, null, "CodeUnite", index, value.toString());
	}

	public void replaceCodeUniteAt(String value, int index) throws Exception {
		replaceCodeUniteAt(new SchemaString(value), index);
	}

	public int getLibelleUniteMinCount() {
		return 1;
	}

	public int getLibelleUniteMaxCount() {
		return 1;
	}

	public int getLibelleUniteCount() {
		return getDomChildCount(Attribute, null, "LibelleUnite");
	}

	public boolean hasLibelleUnite() {
		return hasDomChild(Attribute, null, "LibelleUnite");
	}

	public SchemaString getLibelleUniteAt(int index) throws Exception {
		return new SchemaString(getDomNodeValue(getDomChildAt(Attribute, null, "LibelleUnite", index)));
	}

	public SchemaString getLibelleUnite() throws Exception {
		return getLibelleUniteAt(0);
	}

	public void removeLibelleUniteAt(int index) {
		removeDomChildAt(Attribute, null, "LibelleUnite", index);
	}

	public void removeLibelleUnite() {
		while (hasLibelleUnite())
			removeLibelleUniteAt(0);
	}

	public void addLibelleUnite(SchemaString value) {
		appendDomChild(Attribute, null, "LibelleUnite", value.toString());
	}

	public void addLibelleUnite(String value) throws Exception {
		addLibelleUnite(new SchemaString(value));
	}

	public void insertLibelleUniteAt(SchemaString value, int index) {
		insertDomChildAt(Attribute, null, "LibelleUnite", index, value.toString());
	}

	public void insertLibelleUniteAt(String value, int index) throws Exception {
		insertLibelleUniteAt(new SchemaString(value), index);
	}

	public void replaceLibelleUniteAt(SchemaString value, int index) {
		replaceDomChildAt(Attribute, null, "LibelleUnite", index, value.toString());
	}

	public void replaceLibelleUniteAt(String value, int index) throws Exception {
		replaceLibelleUniteAt(new SchemaString(value), index);
	}
}
